package com.wocao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wocao.entity.SysUserPost;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
* @Entity com.wocao.entity.SysUserPost
*/
public interface SysUserPostMapper extends BaseMapper<SysUserPost> {

    //清空用户岗位关系
    @Delete("DELETE FROM sys_user_post WHERE user_id = #{userId}")
    void nullPostByUser(Long userId);
    //添加用户岗位关系
    void addPostByUser(@Param("userId") Long userId, @Param("postIds") List<Integer> postIds);


}
